<template>
	<view :class="{'flex-flow':flexFlow}" class="chat-item">
		<view class="chat-head" @click="callFatherMethod()">
			<image :src="customData.avatar" mode="aspectFill"></image>
		</view>
		<view class="chat-content">
			<rich-text :nodes="customData.message"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		name: "chatText",
		props:{
			flexFlow:{
				type:Boolean,
				default:true,
			},
			customData:{
				type:Object,
				default:{
					avatar:'',
					userId:0,
					message:'',
				},
			}
		},
		data() {
			return {
			};
		},
		created() {
			
		},
		mounted() {
		
		},
		methods: {
			callFatherMethod(){
				this.$emit('callFatherMethod',this.customData.userId)
			}
		},
	};
</script>

<style lang="scss" scoped>

	
</style>